Skip to content

core: one Dispatcher for the facades' request plumbing - #79

Merged
omahjoub merged 1 commit into
mainfrom
facade
Aug 30, 2026
Merged

core: one Dispatcher for the facades' request plumbing#79
omahjoub merged 1 commit into
mainfrom
facade

Conversation

@omahjoub

Copy link
Copy Markdown
Owner

Summary

  • The 0.3.0 retrospective listed "8× duplicated facade plumbing": every domain facade assembled the interceptor chain, recorded fanar.model / http.method / http.url and ran InterceptorChainImpl in its own private dispatch. That lives in one qa.fanar.core.internal.dispatch.Dispatcher now (0.4.0 plan, Phase 6); each facade's dispatch is a one-line delegation and the class owns only its endpoint, wire format and decoding. Net −104 lines.
  • Internal refactor under ADR-018 — no ADR, no behaviour change: facade constructors, FanarClient and all eight *ClientImplTests are untouched (each facade builds its own Dispatcher from the same arguments). http.url is now read from the request the facade built rather than its endpoint field — always the same URI, including the per-name voice delete.
  • The dispatcher gets its own package instead of the plan's internal.transport: RetryInterceptor already imports from internal.transport, so placing it there would have made retry ↔ transport cyclic. DispatcherTest proves attribute order, the omitted model attribute, chain order (a user interceptor sees the bearer header the built-in set) and null arguments; ARCHITECTURE, PROJECT_STATE and CHANGELOG updated.

Type of change

  • Bug fix
  • New feature / capability
  • New module
  • Refactoring (no behavior change)
  • Breaking change
  • Documentation / tooling / CI only

Test plan

  • mvn verify passes locally
  • Live tests pass against the real Fanar API (if applicable, with FANAR_API_KEY set)
  • GraalVM --self-test passes (if the SDK's reflective surface changed)

Reviewer checklist

  • Public API changes are intentional, documented in javadoc, and an ADR was added/updated if the design changed
  • Which *IntegrationTest proves the behaviour this PR claims? (100 % JaCoCo on a unit is not proof of wiring — see CONTRIBUTING "Testing")
  • Breaking changes carry @Deprecated(since, forRemoval = true) and a migration path in the PR description
  • BOM updated if modules were added or removed
  • No third-party types leak into qa.fanar.core public API
  • If a non-obvious project decision was made, capture it in memory/ so future contributors find it

@omahjoub
omahjoub merged commit 0d80132 into main Aug 30, 2026
5 checks passed
@omahjoub
omahjoub deleted the facade branch August 30, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant